<template>
  <div>
    <img alt="Vue logo" src="./assets/logo.png">
    <h3>我是h3</h3>
    <ul>
      <!-- 有唯一值给唯一值，没有唯一值给下标 -->
      <!-- 以后写v-for一定要加key，作用：提升内部的复用性能 -->
      <li v-for="(item,index) in list" :key="index">{{ item }}</li>
    </ul>
    <HelloWorld msg="Welcome to Your Vue.js App"/>
  </div>
</template>

<script>
// 导入组件
import HelloWorld from './components/HelloWorld.vue'

export default {
  name: 'App',
  // 注册组件
  components: {
    HelloWorld
  },
  data() {
    return {
      list: [10,20,30]
    }
  },
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
